package com.itcam.tingshu.order.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itcam.tingshu.model.order.OrderInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itcam.tingshu.vo.order.OrderInfoVo;
import com.itcam.tingshu.vo.order.TradeVo;

public interface OrderInfoService extends IService<OrderInfo> {


    /**
     * 订单结算页
     * @param tradeVo
     * @param userId
     * @return
     */
    OrderInfoVo trade(TradeVo tradeVo, Long userId);

    /**
     * 提交订单
     * @param orderInfoVo
     * @param userId
     * @return
     */
    String submitOrder(OrderInfoVo orderInfoVo, Long userId);

    /**
     * 订单取消
     * @param l
     */
    void orderCancel(long l);

    /**
     * 根据订单编号获取订单对象
     * @param orderNo
     * @return
     */
    OrderInfo getOrderInfo(String orderNo);

    /**
     * 查看我的订单
     * @param pageParam
     * @param userId
     * @return
     */
    IPage<OrderInfo> findUserPage(Page<OrderInfo> pageParam, Long userId,String orderStatus);

    /**
     * 订单支付成功
     * @param outTradeNo
     */
    void orderPaySuccess(String outTradeNo);


}
